const develop = {
    httpBaseUrl: 'http://192.168.1.168:8082/boray-szm-j-mini',
    socketBaseUrl: 'ws://192.168.1.168:8082/boray-szm-j-mini/webSocket'
}
const trial = {
    httpBaseUrl: 'https://devportal.boosdon.com/boray-szm-j-mini',
    socketBaseUrl: 'wss://devportal.boosdon.com/boray-szm-j-mini/webSocket'
}
const release = {
    httpBaseUrl: 'https://szm.bosdon.com.cn/boray-szm-j-mini',
    socketBaseUrl: 'wss://szm.bosdon.com.cn/boray-szm-j-mini/webSocket'
}
const env = {
    develop: develop,
    trial : release,
    release: release
}
const {miniProgram: {envVersion}} = wx.getAccountInfoSync();

const { httpBaseUrl, socketBaseUrl } = env[envVersion]
console.log({envVersion})

const operationCode = {
    add: 0x0001,
    bingdingController: 0x0004,
    unbingdingController: 0x0005,
    allStatus: 0x0006, //data[0]: 联机；data[1]：绑定；data[2]：锁定；data[3]：灯具加密
    setLinkingPassword: 0x0003,
    updateAccessPassword: 0x0002,
    lockingController: 0x000A,
    unlockingController: 0x000B,
    updateLinkingPassword: 0x0010,
    getLinkingPassword: 0x0011,
    token: 0x0A00,
    checkPassword: 0x0020, //查询加密盒子与灯控的联机密码
    checkControllerRespond: 0x0021,//查询灯控响应状态
    scheduleLocking: 0x0012, //定时锁定
    scheduleTime: 0x0013, //定时时间
    lampsEncryptedOn: 0x0030, //灯具加密
    lampsEncryptedOff: 0x0031, //灯具不加密
};
export { httpBaseUrl, socketBaseUrl, operationCode, envVersion}